package org.me.Anime;

import org.me.Anime.Utli.GlobalVariable;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ScrollView;

public class DrawAnimeColorActivity extends Activity implements OnClickListener{
	
	ImageView imgRED;
	ImageView imgPINK;
	ImageView imgGREEN;
	ImageView imgBLUE;
	ImageView imgYELLOW;
	ImageView imgWHITE;
	ImageView imgNAU;
	ImageView imgTIM_DAM;
	ImageView imgXANH_LA_CAY_DAM;
	ImageView imgVANG_LA_CHUOI;
	ImageView imgXANH_DA_TROI_DAM;
	ImageView imgXANH_DAM;
	ImageView imgXANH_NHAT;
	ImageView imgCAM;
	ImageView imgCAM_DAM;
	ImageView imgHONG;
	public static int POSITION = -1;
	ScrollView scrollView;
	
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.list_enum_color);
        scrollView = (ScrollView)findViewById(R.id.scrollView1);
        imgRED = (ImageView)findViewById(R.id.imgRED);
        imgPINK = (ImageView)findViewById(R.id.imgPINK);
        imgGREEN = (ImageView)findViewById(R.id.imgGREEN);
        imgBLUE = (ImageView)findViewById(R.id.imgBLUE);
        imgYELLOW = (ImageView)findViewById(R.id.imgYELLOW);
        imgWHITE = (ImageView)findViewById(R.id.imgWHITE);
        imgNAU = (ImageView)findViewById(R.id.imgNAU);
        imgTIM_DAM = (ImageView)findViewById(R.id.imgTIM_DAM);
        imgXANH_LA_CAY_DAM = (ImageView)findViewById(R.id.imgXANH_LA_CAY_DAM);
        imgVANG_LA_CHUOI = (ImageView)findViewById(R.id.imgVANG_LA_CHUOI);
        imgXANH_DA_TROI_DAM = (ImageView)findViewById(R.id.imgXANH_DA_TROI_DAM);
        imgXANH_DAM = (ImageView)findViewById(R.id.imgXANH_DAM);
        imgXANH_NHAT = (ImageView)findViewById(R.id.imgXANH_NHAT);
        imgCAM = (ImageView)findViewById(R.id.imgCAM);
        imgCAM_DAM = (ImageView)findViewById(R.id.imgCAM_DAM);
        imgHONG = (ImageView)findViewById(R.id.imgHONG);
        
        imgRED.setOnClickListener(this);
        imgPINK.setOnClickListener(this);
        imgGREEN.setOnClickListener(this);
        imgBLUE.setOnClickListener(this);
        imgYELLOW.setOnClickListener(this);
        imgWHITE.setOnClickListener(this);
        imgNAU.setOnClickListener(this);
        imgTIM_DAM.setOnClickListener(this);
        imgXANH_LA_CAY_DAM.setOnClickListener(this);
        imgVANG_LA_CHUOI.setOnClickListener(this);
        imgXANH_DA_TROI_DAM.setOnClickListener(this);
        imgXANH_DAM.setOnClickListener(this);
        imgXANH_NHAT.setOnClickListener(this);
        imgCAM.setOnClickListener(this);
        imgCAM_DAM.setOnClickListener(this);
        imgHONG.setOnClickListener(this);
        
        
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		
		switch (v.getId()) {
		case R.id.imgRED:
			GlobalVariable.COLOR1 = Color.RED;
		
			break;
		case R.id.imgPINK:
			GlobalVariable.COLOR1 = Color.parseColor("#ff00ff");
		
			break;
		case R.id.imgGREEN:
			GlobalVariable.COLOR1 = Color.GREEN;
		
			break;
		case R.id.imgBLUE:
			GlobalVariable.COLOR1 = Color.BLUE;
		
			break;
		case R.id.imgYELLOW:
			GlobalVariable.COLOR1 = Color.YELLOW;
		
			break;
		case R.id.imgWHITE:
			GlobalVariable.COLOR1 = Color.WHITE;
		
			break;
		case R.id.imgNAU:
			GlobalVariable.COLOR1 = Color.parseColor("#800000");
		
			break;
		case R.id.imgTIM_DAM:
			GlobalVariable.COLOR1 = Color.parseColor("#800080");
		
			break;
		case R.id.imgXANH_LA_CAY_DAM:
			GlobalVariable.COLOR1 = Color.parseColor("#008000");
		
			break;
		case R.id.imgVANG_LA_CHUOI:
			GlobalVariable.COLOR1 = Color.parseColor("#808000");
		
			break;
		case R.id.imgXANH_DA_TROI_DAM:
			GlobalVariable.COLOR1 = Color.parseColor("#000080");
		
			break;
		case R.id.imgXANH_DAM:
			GlobalVariable.COLOR1 = Color.parseColor("#008080");
		
			break;
		case R.id.imgXANH_NHAT:
			GlobalVariable.COLOR1 = Color.parseColor("#00ffff");
		
			break;
		case R.id.imgCAM:
			GlobalVariable.COLOR1 = Color.parseColor("#00ffff");
		
			break;
		case R.id.imgCAM_DAM:
			GlobalVariable.COLOR1 = Color.parseColor("#ff3300");
		
			break;
		case R.id.imgHONG:
			GlobalVariable.COLOR1 = Color.parseColor("#ff0066");
		
			break;
			
	
			
			
		
		}
		GlobalVariable.checkPickColor = true;
		finish();
		
		
	}
	
	

}
